package cn.gson.fengboot.model.pojos;

import javax.persistence.*;
import java.sql.Timestamp;
import java.util.Objects;

@Entity
@Table(name = "tfyclue_form", schema = "springboot", catalog = "")
public class TfyclueForm {
    private Integer clueId;//线索ID
    private Timestamp clueEstablishtime;//线索下次联系时间
    private String clueName;//线索名称
    private String clueSource;//线索来源
    private String cluePhone;//线索电话号码
    private String clueMobile;//线索手机号码
    private String clueRemark;//线索备注
    private String cluePeople;//线索的负责员工
    private String cluePerson;//线索创建人
    private String clueSite;//线索地址
    private String clueSitexq;//线索地址详情
    private Timestamp clueNowtime;//线索创建时间
    private Timestamp clueUptime;//线索更新时间
    private int clueState;//线索状态
    private int clueIffollowup;//是否跟进状态
    private String clueLinkmanname;//联系人姓名
    private String clueLinkmansj;//联系人手机
    private QempFrom empId;//员工表
    private String clueSz;//地址数字

    @Id
    @Column(name = "clue_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY, generator = "seq")
    public Integer getClueId() {
        return clueId;
    }

    public void setClueId(Integer clueId) {
        this.clueId = clueId;
    }

    //线索多对员工一
    @ManyToOne
    @JoinColumn(name = "emp_id")
    public QempFrom getEmpId() {
        return empId;
    }

    public void setEmpId(QempFrom empId) {
        this.empId = empId;
    }

    @Basic
    @Column(name = "clue_sz")
    public String getClueSz() {
        return clueSz;
    }

    public void setClueSz(String clueSz) {
        this.clueSz = clueSz;
    }

    @Basic
    @Column(name = "clue_linkmanname")
    public String getClueLinkmanname() {
        return clueLinkmanname;
    }

    public void setClueLinkmanname(String clueLinkmanname) {
        this.clueLinkmanname = clueLinkmanname;
    }

    @Basic
    @Column(name = "clue_linkmansj")
    public String getClueLinkmansj() {
        return clueLinkmansj;
    }

    public void setClueLinkmansj(String clueLinkmansj) {
        this.clueLinkmansj = clueLinkmansj;
    }

    @Basic
    @Column(name = "clue_establishtime")
    public Timestamp getClueEstablishtime() {
        return clueEstablishtime;
    }

    public void setClueEstablishtime(Timestamp clueEstablishtime) {
        this.clueEstablishtime = clueEstablishtime;
    }

    @Basic
    @Column(name = "clue_name")
    public String getClueName() {
        return clueName;
    }

    public void setClueName(String clueName) {
        this.clueName = clueName;
    }

    @Basic
    @Column(name = "clue_source")
    public String getClueSource() {
        return clueSource;
    }

    public void setClueSource(String clueSource) {
        this.clueSource = clueSource;
    }

    @Basic
    @Column(name = "clue_phone")
    public String getCluePhone() {
        return cluePhone;
    }

    public void setCluePhone(String cluePhone) {
        this.cluePhone = cluePhone;
    }

    @Basic
    @Column(name = "clue_mobile")
    public String getClueMobile() {
        return clueMobile;
    }

    public void setClueMobile(String clueMobile) {
        this.clueMobile = clueMobile;
    }

    @Basic
    @Column(name = "clue_remark")
    public String getClueRemark() {
        return clueRemark;
    }

    public void setClueRemark(String clueRemark) {
        this.clueRemark = clueRemark;
    }

    @Basic
    @Column(name = "clue_people")
    public String getCluePeople() {
        return cluePeople;
    }

    public void setCluePeople(String cluePeople) {
        this.cluePeople = cluePeople;
    }

    @Basic
    @Column(name = "clue_person")
    public String getCluePerson() {
        return cluePerson;
    }

    public void setCluePerson(String cluePerson) {
        this.cluePerson = cluePerson;
    }

    @Basic
    @Column(name = "clue_site")
    public String getClueSite() {
        return clueSite;
    }

    public void setClueSite(String clueSite) {
        this.clueSite = clueSite;
    }

    @Basic
    @Column(name = "clue_sitexq")
    public String getClueSitexq() {
        return clueSitexq;
    }

    public void setClueSitexq(String clueSitexq) {
        this.clueSitexq = clueSitexq;
    }

    @Basic
    @Column(name = "clue_nowtime")
    public Timestamp getClueNowtime() {
        return clueNowtime;
    }

    public void setClueNowtime(Timestamp clueNowtime) {
        this.clueNowtime = clueNowtime;
    }

    @Basic
    @Column(name = "clue_uptime")
    public Timestamp getClueUptime() {
        return clueUptime;
    }

    public void setClueUptime(Timestamp clueUptime) {
        this.clueUptime = clueUptime;
    }

    @Basic
    @Column(name = "clue_state")
    public int getClueState() {
        return clueState;
    }

    public void setClueState(int clueState) {
        this.clueState = clueState;
    }

    @Basic
    @Column(name = "clue_iffollowup")
    public int getClueIffollowup() {
        return clueIffollowup;
    }

    public void setClueIffollowup(int clueIffollowup) {
        this.clueIffollowup = clueIffollowup;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        TfyclueForm that = (TfyclueForm) o;
        return clueId == that.clueId &&
                Objects.equals(clueName, that.clueName) &&
                Objects.equals(clueRemark, that.clueRemark) &&
                Objects.equals(cluePeople, that.cluePeople) &&
                Objects.equals(cluePerson, that.cluePerson) &&
                Objects.equals(clueNowtime, that.clueNowtime) &&
                Objects.equals(clueUptime, that.clueUptime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(clueId, clueName, clueRemark, cluePeople, cluePerson, clueNowtime, clueUptime);
    }

}
